<?php
class Setting_model extends CI_Model {
	
	public function get_value_by_name($name)
	{
		$sql = 'SELECT * FROM setting WHERE settingName=? LIMIT 1';
		$query = $this->db->query($sql, array($name));
		
		if($query->num_rows == 0) return false;
		
		return $query->row()->settingValue;
	}
}
?>